<?php

namespace yuankezhan\yiiTableWidget;

class SelectFuncReturn
{
    /**
     * @var bool $canSelect 是否可以选择
     */
    public bool $canSelect;

    /**
     * @var string $cantSelectNotice 不能选择的提示原因
     */
    public string $cantSelectNotice = "";

    public function __construct(bool $canSelect, string $cantSelectNotice)
    {
        $this->canSelect = $canSelect;
        $this->cantSelectNotice = $cantSelectNotice;
    }

    public static function set(bool $canSelect, string $cantSelectNotice = "")
    {
        return new static($canSelect, $cantSelectNotice);
    }

}